﻿'Public Class EditBox
'	Inherits TextBoxBase

'	Dim m_MinLength As Integer
'	Dim m_Casing As CharacterCasing

'	Sub New()
'		Multiline = True
'		ScrollBars = Windows.Forms.ScrollBars.Vertical
'		VisibleLines = 4
'	End Sub

'	Dim m_VisibleLines As Integer = 4
'	Public Property VisibleLines() As Integer
'		Get
'			Return m_VisibleLines
'		End Get
'		Set(ByVal Value As Integer)
'			m_VisibleLines = Value
'			Height = (MinimumSize.Height - 4) * Value + 4
'		End Set
'	End Property

'	Public Overrides Property MaximumSize() As System.Drawing.Size
'		Get
'			Return New Size(0, 0)
'		End Get
'		Set(ByVal value As System.Drawing.Size)
'			MyBase.MaximumSize = value
'		End Set
'	End Property

'	Public Overrides Property Value() As Object
'		Get
'			Return Text
'		End Get
'		Set(ByVal Value As Object)
'			If IsDBNull(Value) Then Value = ""
'			Text = Value
'		End Set
'	End Property

'	Property MinLength() As Integer
'		Get
'			Return m_MinLength
'		End Get
'		Set(ByVal Value As Integer)
'			m_MinLength = Value
'		End Set
'	End Property

'	Private Sub EditBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.TextChanged
'		Static Updating As Boolean
'		RaiseChangeEvent()
'		If Updating Then Exit Sub
'		With TextInfo
'			.Text = .Text
'			.SelectionStart = SelectionStart
'			.SelectionLength = SelectionLength
'		End With
'		If Casing <> SSD.CharacterCasing.Normal Then
'			Dim NewText As String = Text
'			Select Case Casing
'				Case SSD.CharacterCasing.Lower
'					NewText = NewText.Replace("I", "ı")
'					NewText = NewText.Replace("İ", "i")
'					NewText = NewText.ToLower
'				Case SSD.CharacterCasing.Upper
'					NewText = NewText.Replace("i", "İ")
'					NewText = NewText.Replace("ı", "I")
'					NewText = NewText.ToUpper
'			End Select
'			If NewText <> Text Then
'				With TextInfo
'					Updating = True
'					Text = NewText
'					SelectionStart = .SelectionStart
'					SelectionLength = .SelectionLength
'					Updating = False
'				End With
'			End If
'		End If
'	End Sub

'	Property Casing() As CharacterCasing
'		Get
'			Return m_Casing
'		End Get
'		Set(ByVal Value As CharacterCasing)
'			m_Casing = Value
'		End Set
'	End Property

'	ReadOnly Property BreaksMinRule() As Boolean
'		Get
'			Return Len(Value) < MinLength
'		End Get
'	End Property

'	ReadOnly Property BreaksMaxRule() As Boolean
'		Get
'			Return Len(Value) > MaxLength
'		End Get
'	End Property

'	Public Overrides ReadOnly Property IsEmpty() As Boolean
'		Get
'			Return Value = ""
'		End Get
'	End Property

'	Public Overrides Function Errors() As String
'		If IsRequired AndAlso IsEmpty Then Return Caption & " alanı boş olamaz."
'		If Not IsEmpty Then
'			If BreaksMinRule Then Return Caption & " alanı en az " & MinLength & " uzunluğunda olmalıdır."
'			If BreaksMaxRule Then Return Caption & " alanı en çok " & MaxLength & " uzunluğunda olmalıdır."
'		End If
'		Return ""
'	End Function

'End Class